package cn.zm.trip.web.domain;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import org.springframework.stereotype.Component;

import java.io.Serializable;
import java.util.Date;

@Data
@TableName("tp_user")
public class User implements Serializable {
	@TableField("tp_uid")
	private String uid;
	@TableField("tp_uname")
	private String uname;
	@TableField("tp_uemail")
	private String uemail;
	@TableField("tp_upwd")
	private String upwd;
	@TableField("tp_age")
	private String age;
	@TableField("tp_gender")
	private String gender;
	@TableField("tp_upic")
	private String upic;
	@TableField("tp_phone")
	private String phone;
	@TableField("tp_regDate")
	private Date regDate;
	@TableField("tp_updateTime")
	private Date updateTime;

	public User(String uname, String uemail, String upwd) {
		this.uname = uname;
		this.uemail = uemail;
		this.upwd = upwd;
		this.regDate = new Date();
		this.updateTime = new Date();
	}

	public User(String uemail, String upwd) {
		this.uemail = uemail;
		this.upwd = upwd;
		this.regDate = new Date();
		this.updateTime = new Date();
	}

	public User() {
		this.regDate = new Date();
		this.updateTime = new Date();
	}
}
